﻿CREATE TABLE [dbo].[AmixComponenteSecundare] (
    [IDComponenta]  INT             IDENTITY (1, 1) NOT NULL,
    [IDMijlocFix]   INT             NOT NULL,
    [Denumire]      VARCHAR (100)   NOT NULL,
    [Cantitate]     SMALLINT        CONSTRAINT [DF_AmixComponenteSecundare_Cantitate] DEFAULT ((1)) NOT NULL,
    [Pret]          DECIMAL (18, 2) CONSTRAINT [DF_AmixComponenteSecundare_Pret] DEFAULT ((0)) NOT NULL,
    [Valoare]       NCHAR (10)      CONSTRAINT [DF_AmixComponenteSecundare_Valoare] DEFAULT ((0)) NOT NULL,
    [IDDepartament] INT             CONSTRAINT [DF_AmixComponenteSecundare_IDDepartament] DEFAULT ((0)) NULL,
    CONSTRAINT [PK_AmixComponenteSecundare] PRIMARY KEY CLUSTERED ([IDComponenta] ASC),
    CONSTRAINT [FK_AmixComponenteSecundare_AmixRegistru] FOREIGN KEY ([IDMijlocFix]) REFERENCES [dbo].[AmixRegistru] ([IDMijlocFix]),
    CONSTRAINT [FK_AmixComponenteSecundare_Departamente] FOREIGN KEY ([IDDepartament]) REFERENCES [dbo].[Departamente] ([IDDepartament])
);

